getProviderList = function(obj) {
	$('#provider').val(obj);
	$("#providerList").dataTable().fnDestroy();
	$("#providerList").dataTable({
		"processing" : true,
		"serverSide" : false,
		"paginationType" : "full_numbers",
		"ajax" : "/Medical_Instrument/firstEnterprise/getProviderList",
		"aaSorting" : [ [ 0, "desc" ] ],
		"aoColumnDefs" : [ {
			"orderable" : false,
			"aTargets" : [ 1, 2, 3, 4, 5, 6]
		} ],
		"columns" : [ {
			"data" : "supplierEnterpriseNo",
			"defaultContent" : ""
		}, {
			"data" : "enterpriseName",
			"defaultContent" : ""
		}, {
			"data" : "enterpriseName",
			"defaultContent" : ""
		}, {
			"data" : "registerAddress",
			"defaultContent" : ""
		}, {
			"data" : "linkman",
			"defaultContent" : ""
		}, {
			"data" : "linkphone",
			"defaultContent" : ""
		}, {
			"data" : "remark",
			"defaultContent" : ""
		} ]
	});
}

getallvarieties = function(obj){
	$("#choiceDML").val(obj);
	
	$("#choice").dataTable().fnDestroy();
	$("#choice").dataTable({
		"processing" : true,
		"serverSide" : false,
		"paginationType" : "full_numbers",
		"ajax" : "/Medical_Instrument/firstvariety/getConvertedIntoGoods",
		"aaSorting" : [ [ 0, "desc" ] ], 
		"aoColumnDefs" : [ {
			"orderable" : false,
			"aTargets" : [ 1, 2, 3, 4, 5, 6]
		} ],
								
		"columns" : [ {
			"data" : "id",   // 商品编号
			"defaultContent" : ""
		}, {
			"data" : "inputCode",  // 输入码
			"defaultContent" : ""
		}, {
			"data" : "varietyName", // 品名
			"defaultContent" : ""
		}, {
			"data" : "manufacturer",  // 生产厂家
			"defaultContent" : ""
		}, {
			"data" : "specification",  // 规格	
			"defaultContent" : ""
		}, {
			"data" : "unit",  // 单位
			"defaultContent" : ""
		}, {
			"data" : "retailPrice",  // 零售价
			"defaultContent" : ""
		}, {
			"data" : "tradePrice",  // 批发价
			"defaultContent" : ""
		}, {
			"data" : "model",  // 型号
			"defaultContent" : ""
		}, {
			"data" : "registraionNo",  // 产品注册证号/备案凭证编号
			"defaultContent" : ""
		}, {
			"data" : "barCode",  // 条码
			"defaultContent" : ""
		} ]
	});
}

$(function(){
	$("#supplier_var_table").dataTable().fnDestroy();
	$("#supplier_var_table").dataTable({
		"processing" : true,
		"serverSide" : false,
		"paginationType" : "full_numbers",
		"ajax" : "/Medical_Instrument/supplierbreed/getSupplierBreedList",
		"aaSorting" : [ [ 0, "desc" ] ],
		"aoColumnDefs" : [ {
			"orderable" : false,
			"aTargets" : [ 1, 2, 3, 4, 5, 6]
		} ],
								
		"columns" : [ {
			"data" : "enterprise_name",   // 供应商名称
			"defaultContent" : ""
		}, {
			"data" : "supplierPeopleName",  // 供货人员
			"defaultContent" : ""
		}, {
			"data" : "variety_name", //品名
			"defaultContent" : ""
		}, {
			"data" : "manufacturer",  //生产厂家
			"defaultContent" : ""
		}, {
			"data" : "specification",  //规格	
			"defaultContent" : ""
		}, {
			"data" : "unit",  //单位
			"defaultContent" : ""
		}, {
			"data" : "registration_no",  //产品注册证号/备案凭证编号
			"defaultContent" : ""
		} , {
			"data" : "remarks", //备注
			"defaultContent" : ""
		} ]
	});
});
	